import axios from '~/axios'
import { queryParams } from '~/composables/util.js'
export function getUserList(page,query = {}){
    let r = queryParams(query)
    return axios.get(`/admin/user/${page}${r}`)
}
export function editUserStatus(id,status){
    return axios.post(`/admin/user/${id}/update_status`,{status})
}

export function createUser(data){
    return axios.post("/admin/user",data)
}
export function editUser(id,data){
    return axios.post(`/admin/user/${id}`,data)
}
export function deleteUser(id){
    return axios.post(`/admin/user/${id}/delete`)
}